package com.csap.framework.oauth2.server.entity;

import com.csap.framework.annotation.apidoc.Description;
import com.csap.framework.oauth2.server.model.UserOpenInfoModel;
import com.csap.mybatisplus.annotation.IdType;
import com.csap.mybatisplus.annotation.TableId;
import com.csap.mybatisplus.annotation.TableName;
import com.csap.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户开放的相关信息
 * </p>
 *
 * @author yangchengfu
 * @dateTime 2021-07-29 13:27:19
 */
@Data
@TableName(value = "user_open_info")
@Description(value = "用户开放的相关信息实体类")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class UserOpenInfoEntity extends Model<UserOpenInfoEntity, UserOpenInfoModel> {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO, value = "id")
    private Long id;
    /**
     * 客户端的ID
     */
    private String clientId;
    /**
     * 用户ID
     */
    private String userId;
    /**
     * 用户的opendId
     */
    private String openId;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 平台
     */
    private String platform;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
